<div id="create-workspace">
  <che-toolbar che-title="New Workspace"
               class="create-workspace-toolbar">
    <che-button-dropdown button-style="che-button-save-flat"
                         button-disabled="createWorkspaceController.isCreateButtonDisabled()"
                         main-action-config="createWorkspaceController.headerCreateButtonConfig.mainAction"
                         other-actions-config="createWorkspaceController.headerCreateButtonConfig.otherActions"
                         class="create-workspace-header-button"></che-button-dropdown>
  </che-toolbar>
  <md-content md-theme="default" class="create-workspace-content">
    <md-tabs md-dynamic-height
             md-stretch-tabs="auto"
             md-selected="createWorkspaceController.selectedTab"
             class="create-workspace-content"
             md-no-ink-bar>
      <!-- READY-TO-GO STACK -->
      <md-tab md-on-select="createWorkspaceController.onSelectTab(createWorkspaceController.tabs.READY_TO_GO)">
        <md-tab-label>
          <span class="che-tab-label-title">READY-TO-GO STACK</span>
        </md-tab-label>
        <md-tab-body>
          <ng-form name="createWorkspaceReadyToGoForm" id="create-workspace-ready-to-go-form">
            <ready-to-go-stacks
              ng-init="createWorkspaceController.registerForm(createWorkspaceController.tabs.READY_TO_GO, createWorkspaceReadyToGoForm)"
              on-change="createWorkspaceController.onDevfileChange(createWorkspaceController.tabs.READY_TO_GO, devfile, attrs)">
              <che-button-save-flat id="create-workspace-ready-to-go-button" name="saveButton"
                                    che-button-title="Create & Open"
                                    ng-click="createWorkspaceController.createWorkspaceAndOpenIDE()"
                                    ng-disabled="createWorkspaceReadyToGoForm.$invalid">
              </che-button-save-flat>
            </ready-to-go-stacks>
          </ng-form>
        </md-tab-body>
      </md-tab>
      <!-- IMPORT CUSTOM STACK -->
      <md-tab
        md-on-select="createWorkspaceController.onSelectTab(createWorkspaceController.tabs.IMPORT_DEVFILE)">
        <md-tab-label>
          <span class="che-tab-label-title">IMPORT DEVFILE</span>
        </md-tab-label>
        <md-tab-body>
          <ng-form name="createWorkspaceImportStackForm" id="create-workspace-import-stack-form">
            <import-stack
              ng-init="createWorkspaceController.registerForm(createWorkspaceController.tabs.IMPORT_DEVFILE, createWorkspaceImportStackForm)"
              on-change="createWorkspaceController.onDevfileChange(createWorkspaceController.tabs.IMPORT_DEVFILE, devfile, attrs)">
              <che-button-save-flat id="create-workspace-import-stack-form-button" name="saveButton"
                                    che-button-title="Create & Open"
                                    ng-click="createWorkspaceController.createWorkspaceAndOpenIDE()"
                                    ng-disabled="createWorkspaceImportStackForm.$invalid">
              </che-button-save-flat>
            </import-stack>
          </ng-form>
        </md-tab-body>
      </md-tab>
    </md-tabs>
  </md-content>
</div>
